<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%
String path = request.getContextPath(); 
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    
    <title>学生首页</title>
    <link href="<%=path %>/css/index_css_2012.css" rel="stylesheet" type="text/css" />
    <link href="<%=path %>/css/miaov_style.css" rel="stylesheet" type="text/css" />
    <script src="<%=path%>/js/resizeIframe.js" type="text/javascript"></script>
    <script src="<%=path%>/dwr/engine.js"></script>
	<script src="<%=path%>/dwr/util.js"></script>
	<script src="<%=path%>/dwr/interface/shiyueDwr.js"></script>
	<script type="text/javascript" src="<%=path %>/js/syAjax.js"></script>
	<script type="text/javascript" src="<%=path %>/js/miaov.js"></script>
	<script type="text/javascript">
	var oaCustomNavigationHtml="";
	  	window.onload=function()
		{
		    initMenu();/**首页菜单动态效果*/
		  	getCurrentYear();/**当前年度*/
		  	getCurrentSemeter();/**当前学期*/
		  getNotReadDocumentCount();/**获取未读邮件数量*/
		   syAjax.request("post","<%=path %>/findAllOaCustomNavigationByAjaxOaCustomNavigationAction.action","",{success:function (response){oaCustomNavigationHtml=response;},fail:onFail,type:'plain'});
		}
		


		/**iframe自动撑大的方法*/
		 function resizeIframe(){
      		iframeResize('baseSet',baseSet);      
      	}
      	/**改变本页面iframe地址的方法*/
      	function go(src){
			if(src.indexOf("toScheduleDayscheduleJobInformationAction")!=-1){
				//点击日程时的特殊处理
				iframeBigger(550);
				document.getElementById('baseSet').src=src;
			}else{
				document.getElementById('baseSet').style.height="";
				document.getElementById('baseSet').src=src+"&t="+new Date();
			}
		}
		
			/**根据年级id，查询班级*/
		function showClassByGradeId(gradeId,divId,liId){
			syAjax.request("post","<%=path %>/getAllClassByGradeIdAjaxGradeAndClassAction.action","year=${applicationScope.currentYear}&grade.gradeId="+gradeId,{success:function (response){
				var data = JSON.parse(response);
				var showStr="<ul>";
				if(data!=null){				
					if(data.length>0){
						for(var i=0;i<data.length;i++){
							if(divId=='newStu_DIV'){
								showStr+="<li style='width:100px;'><a href=\"javascript:go('<%=path%>/findStudentByClassIdsUserAction.action?cla.classId="+data[i].classId+"');\" style='text-decoration: none; color: #026DB8;' onmouseover=\"this.style.color='red'\" onmouseout=\"this.style.color='#026DB8'\">"+data[i].name+"</a></li>";	
							}else if(divId=='xueji_DIV'){
								showStr+="<li style='width:100px;'><a href=\"javascript:go('<%=path%>/findStudentByClassIdUserAction.action?cla.classId="+data[i].classId+"');\" style='text-decoration: none; color: #026DB8;' onmouseover=\"this.style.color='red'\" onmouseout=\"this.style.color='#026DB8'\">"+data[i].name+"</a></li>";								
							}
							
						}
					}
				}
				showStr+="</ul>";
				document.getElementById(divId+gradeId).innerHTML=showStr;
				if(document.getElementById(divId+gradeId).style.display=='none'){
					document.getElementById(divId+gradeId).style.display='';
					document.getElementById(liId).style.width="110px";
				}else{
					document.getElementById(divId+gradeId).style.display='none';
					document.getElementById(liId).style.width="";
				}
				changeLeftMenu(currentMenu);
			},fail:onFail,type:'plain'});
		}
		
		/**根据divId，控制某个div隐藏或显示*/
		function showDIVById(divId){
			if(document.getElementById(divId).style.display=='none'){
				document.getElementById(divId).style.display='';
			}else{
				document.getElementById(divId).style.display='none';
			}
			if('youjianxiang_DIV'==divId){
				document.getElementById('oaUser_DIV').style.display='none';
				document.getElementById('oaUser_DIV').style.display='';
			}
			
		}		
	//修改密码
	function goUpdatePassword()
	{
		var value=window.showModalDialog("<%=path %>/baseSet/user/updatePassword.jsp?t="+new Date(),'',"dialogHeight:300px;dialogWidth:400px;help=0;scroll=1;");
		if(value=='true')
		{
		  window.location.href="<%=path%>/student/index.jsp";
		}
	}
	
		//获取当前年度
	function getCurrentYear()
	{
	  syAjax.request("post","<%=path %>/findNameByIDyearAndSchoolTermAction.action","year.yearValue=${applicationScope.currentYear }",{success:function (response){
	  	document.getElementById('currentYearSPAN').innerHTML=response;
	  },fail:onFail,type:'plain'});
	}
	//获取当前学期
	function getCurrentSemeter()
	{
	  syAjax.request("post","<%=path %>/findNameByIDyearAndSchoolTermAction.action","schoolTerm.schoolTermValue=${applicationScope.currentSchoolTerm }",{success:function (response){
	  	document.getElementById('currentSchoolTermSPAN').innerHTML=response;
	  },fail:onFail,type:'plain'});
	}
	

	//到创建邮件页面
	function toAddDocument(){
		window.open("<%=path%>/toAddDocDocAction.action?t="+new Date());
	}
	
	 function clickLink(shortCutId){
		 	document.getElementById(shortCutId+"LINK").click();
		 }
	/**获取未读邮件数量*/
	function getNotReadDocumentCount(){
		syAjax.request("post","<%=path %>/getNotReadDocCountDocAction.action","",{success:function (response){
	  	document.getElementById('notReadCountSPAN').innerHTML="("+response+")";
	  },fail:onFail,type:'plain'});
	}
	 function findAllOaCustomNavigationByAjax(){
    if(oaCustomNavigation!=""){
      var oaCustomNavigation=document.getElementById('oaCustomNavigation');
          oaCustomNavigation.style.display='';
          oaCustomNavigation.style.left=790;
          oaCustomNavigation.style.top=130;
	  	  oaCustomNavigation.innerHTML=oaCustomNavigationHtml;
	  }
    }
    
     function showURL(url){
    	window.open(url);
    }
	
		
		
	</script>


  </head>
  
  <body>
<div>
	<div id="top">
		<div class="banner">
			<table width="100%" border="0" cellpadding="0" cellspacing="0">
				<tr>
					 <td width="180" class="f_6">
				       <img src="<%=path%>/images/img01.gif" id="unitLogo" height="95" width="184"/>
			       	  </td>
					<td width="220"><img src="<%=path %>/images/img01_2.gif" /></td>
					<td height="95">
						<div class="bannerInfo">
					年度：<span id="currentYearSPAN"></span>&nbsp;学期：<span id="currentSchoolTermSPAN"></span>&nbsp;${sessionScope.UserInfo.name}  <a href="javascript:goUpdatePassword();" style="text-decoration: none;color: #FFFFFF;" onmouseover="this.style.color='red'" onmouseout="this.style.color='#FFFFFF'">修改密码</a>  <a href="<%=path %>/exitSystemUserAction.action" style="text-decoration: none;color: #FFFFFF;" onmouseover="this.style.color='red'" onmouseout="this.style.color='#FFFFFF'">退出</a>
						</div>
				</td>
				</tr>
			</table>
		</div>
		<div class="menu">
			
	<div id="header">
				<ul>
					<li class="normal"><a href="<%=path%>/student/index.jsp">我的桌面</a></li>
					<li class="normal"><a href="javascript:go('<%=path %>/searchTimeTableByClassIdSchoolTimeTableAction.action?')">我的课表</a></li>
					<li class="normal"><a href="javascript:go('<%=path %>/toMyConsumptionListMyConsumptionAction.action?');">我的消费</a></li>
					<li class="normal"><a href="javascript:go('<%=path %>/oa/internetClass.jsp?');">网上课堂</a></li>
					<li class="normal"><a href="javascript:go('<%=path %>/oa/internetSchool.jsp?');">网上学校</a></li>
					<li class="normal"><a href="javascript:go('<%=path %>/oa/internetRead.jsp?');">网上阅读</a></li>
					<li class="normal"><a href="javascript:go('<%=path %>/videoSearchClassGradeAndClassAction.action?');">视频探视</a></li>
					<li class="normal"><a href="javascript:go('<%=path %>/toShortCutListoaShortCutAction.action?isStudent=yes');">我的定制</a></li>
					<li class="normal"><a href="http://www.shiyue.com/help/eschool" target="_blank">在线帮助</a></li>
					<li class="normal"><a href="javascript:findAllOaCustomNavigationByAjax();" onmouseover="findAllOaCustomNavigationByAjax();" onmouseout="document.getElementById('oaCustomNavigation').style.display='none'" >自定义菜单</a></li>
				</ul>
				<div id="btn_bg">
					<ul>
						<li class="active"><a href="<%=path%>/student/index.jsp">我的桌面</a></li>
						<li class="active"><a href="javascript:go('<%=path %>/searchTimeTableByClassIdSchoolTimeTableAction.action?')">我的课表</a></li>
						<li class="active"><a href="javascript:go('<%=path %>/toMyConsumptionListMyConsumptionAction.action?');">我的消费</a></li>
						<li class="active"><a href="javascript:go('<%=path %>/oa/internetClass.jsp?');">网上课堂</a></li>
						<li class="active"><a href="javascript:go('<%=path %>/oa/internetSchool.jsp?');">网上学校</a></li>
						<li class="active"><a href="javascript:go('<%=path %>/oa/internetRead.jsp?');">网上阅读</a></li>
						<li class="active"><a href="javascript:go('<%=path %>/videoSearchClassGradeAndClassAction.action?');">视频探视</a></li>
						<li class="active"><a href="javascript:go('<%=path %>/toShortCutListoaShortCutAction.action?isStudent=yes');">我的定制</a></li>
						<li class="active"><a href="http://www.shiyue.com/help/eschool" target="_blank">在线帮助</a></li>
						<li class="active"><a href="javascript:findAllOaCustomNavigationByAjax();" onmouseover="findAllOaCustomNavigationByAjax();" onmouseout="document.getElementById('oaCustomNavigation').style.display='none'">自定义菜单</a></li>
					</ul>
				</div>
			</div>
		</div>
	</div>
	
	<div id="container">
		<div style="float:left; width:190px;">
			<div style=" margin-left:5px;">
				<table width="100%" border="0" cellpadding="0" cellspacing="0" style="border-collapse:collapse" >
					<tr>
						<td width="15" valign="top" class="leftmenuContainer">
							<ul class="leftmenuUl">
								
							
							</ul>
						</td>
						<td valign="top" class="leftContainer">
						
						<!-- 学籍通用项目开始 -->
							<div id="renshiLIDIV">
							<div class="leftTitle">
								<div class="leftTitleContent">
									<a href="javascript:showDIVById('oaUser_DIV');" style="text-decoration: none; color: #FFFFFF;" onmouseover="this.style.color='red'" onmouseout="this.style.color='#FFFFFF'">学生通用项目</a>
								</div>
							</div>
							<div style="clear:both;"></div>
							<div id="oaUser_DIV" class="leftmediumTitle">
								<ul class="mediumTitleUl">
									<li><a id="stujbxxLINK" href="javascript:go('<%=path %>/findStudentInfoByIdUserAction.action?user.userId=${sessionScope.UserInfo.userId}&hiddenbottom=yes');" style="text-decoration: none; color: #026DB8;" onmouseover="this.style.color='red'" onmouseout="this.style.color='#026DB8'">基本信息</a></li>
									<li><a href="javascript:showDIVById('youjianxiang_DIV');" style="text-decoration: none; color: #026DB8;" onmouseover="this.style.color='red'" onmouseout="this.style.color='#026DB8'">邮件箱<span id="notReadCountSPAN"></span></a>
									<div id="youjianxiang_DIV" style="display: none;">
										<ul>
											<li><a id="stuxxLINK" href="javascript:toAddDocument();" style="text-decoration: none; color: #026DB8;" onmouseover="this.style.color='red'" onmouseout="this.style.color='#026DB8'">写信</a></li>
											<li><a id="sjxLINK" href="javascript:go('<%=path%>/findDocByReceiverIdAndStatusDocAction.action?');" style="text-decoration: none; color: #026DB8;" onmouseover="this.style.color='red'" onmouseout="this.style.color='#026DB8'">收件箱</a></li>
											<li><a id="fjxLINK" href="javascript:go('<%=path%>/findDocBySenderIdAndStatusDocAction.action?');" style="text-decoration: none; color: #026DB8;" onmouseover="this.style.color='red'" onmouseout="this.style.color='#026DB8'">发件箱</a></li>
											<li><a id="gdxLINK" href="javascript:go('<%=path%>/findDocGDDocAction.action?');" style="text-decoration: none; color: #026DB8;" onmouseover="this.style.color='red'" onmouseout="this.style.color='#026DB8'">归档箱</a></li>
											<li><a id="cgxLINK" href="javascript:go('<%=path%>/findDocCGDocAction.action?');" style="text-decoration: none; color: #026DB8;" onmouseover="this.style.color='red'" onmouseout="this.style.color='#026DB8'">草稿箱</a></li>
											<li><a id="hszLINK" href="javascript:go('<%=path%>/findDeleteDocByUserIdDocAction.action?');" style="text-decoration: none; color: #026DB8;" onmouseover="this.style.color='red'" onmouseout="this.style.color='#026DB8'">回收站</a></li>
											
										</ul>
									</div>
									</li>
									<li><a id="stuxjbdLINK" href="javascript:go('<%=path %>/findStudentInfoByIdUserAction.action?user.userId=${sessionScope.UserInfo.userId}&hiddentop=yes');" style="text-decoration: none; color: #026DB8;" onmouseover="this.style.color='red'" onmouseout="this.style.color='#026DB8'">学籍变动</a></li>
									<li><a id="stukbapLINK" href="javascript:go('<%=path %>/searchTimeTableByClassIdSchoolTimeTableAction.action?')" style="text-decoration: none; color: #026DB8;" onmouseover="this.style.color='red'" onmouseout="this.style.color='#026DB8'">课表安排</a></li>
									<li><a id="stutjzyLINK" href="#" style="text-decoration: none; color: #026DB8;" onmouseover="this.style.color='red'" onmouseout="this.style.color='#026DB8'">推荐资源</a></li>
									<li>学业成绩查询
									<ul>
											<li><a id="studcksLINK" href="javascript:go('<%=path %>/toExamInfoListForSingleStatisticsmarkArrangeExamAction.action?markExamInfo.year=${applicationScope.currentYear }&markExamInfo.schoolTerm=${applicationScope.currentSchoolTerm}');" style="text-decoration: none; color: #026DB8;" onmouseover="this.style.color='red'" onmouseout="this.style.color='#026DB8'">单次考试</a></li>
											<li><a id="studuocikaoshiLINK" href="javascript:go('<%=path %>/mark/statistics/usuallySelectionSutdent.jsp?a=1');" style="text-decoration: none; color: #026DB8;" onmouseover="this.style.color='red'" onmouseout="this.style.color='#026DB8'">多次考试</a></li>
											
										</ul>
									</li>
									<li><a id="stuhgdlrLINK" href="javascript:go('<%=path %>/toProjectInputamDayWeekMonthAction.action?userId=${sessionScope.UserInfo.userId}&type=1');" style="text-decoration: none; color: #026DB8;" onmouseover="this.style.color='red'" onmouseout="this.style.color='#026DB8'">行规单录入</a></li>
									<li><a id="stuckjxxcLINK" href="javascript:go('<%=path %>/videoSearchClassGradeAndClassAction.action?');" style="text-decoration: none; color: #026DB8;" onmouseover="this.style.color='red'" onmouseout="this.style.color='#026DB8'">查看教学现场</a></li>
									<li><a id="stuszpjLINK" href="#" style="text-decoration: none; color: #026DB8;" onmouseover="this.style.color='red'" onmouseout="this.style.color='#026DB8'">素质评价</a></li>
									<li><a id="stujxlxLINK" href="#" style="text-decoration: none; color: #026DB8;" onmouseover="this.style.color='red'" onmouseout="this.style.color='#026DB8'">家校联系</a></li>
									<li><a id="stukqjlLINK" href="#" style="text-decoration: none; color: #026DB8;" onmouseover="this.style.color='red'" onmouseout="this.style.color='#026DB8'">考勤记录</a></li>
									<li><a id="stuxfjlLINK" href="javascript:go('<%=path %>/toMyConsumptionListMyConsumptionAction.action?');" style="text-decoration: none; color: #026DB8;" onmouseover="this.style.color='red'" onmouseout="this.style.color='#026DB8'">消费记录</a></li>
									
								</ul>
							</div>
							</div>
							<!-- 学籍通用项目结束 -->
							
						<!-- 个人德育报表开始 -->
						<div id="deyuLIDIV">
						<div class="leftTitle">
								<div class="leftTitleContent">
									<a href="javascript:showDIVById('deyuguanli_DIV');" style="text-decoration: none; color: #FFFFFF;" onmouseover="this.style.color='red'" onmouseout="this.style.color='#FFFFFF'">个人德育报表</a>
								</div>
							</div>
							<div style="clear:both;"></div>
						<div id="deyuguanli_DIV" class="leftmediumTitle" style="padding-left: 10px;font-size: 12px;">
						<ul class="mediumTitleUl">	
                             <c:if test="${not empty sessionScope.CLASSMAP}">
                              <c:forEach var="clsMap" items="${sessionScope.CLASSMAP}">
                              <li style="width: 100px;"><a href="javascript:showDIVById('amclass${clsMap.key}_DIV');" style="text-decoration: none; color: #026DB8;" onmouseover="this.style.color='red'" onmouseout="this.style.color='#026DB8'">${clsMap.value }</a>
									<ul id="amclass${clsMap.key}_DIV" style="display: none;">											
											<li><a href="javascript:go('<%=path %>/toStudentDayProjectSearchamDayWeekMonthAction.action?type=1&classId=${clsMap.key }');" style="text-decoration: none; color: #026DB8;" onmouseover="this.style.color='red'" onmouseout="this.style.color='#026DB8'">日报表</a></li>
											<li><a  href="javascript:go('<%=path %>/toStudentWeekProjectSearchAMAwardsAction.action?userId=${sessionScope.UserInfo.userId}&classId=${clsMap.key }&type=1');" style="text-decoration: none; color: #026DB8;" onmouseover="this.style.color='red'" onmouseout="this.style.color='#026DB8'">周报表</a></li>
											<li><a href="javascript:go('<%=path %>/toProjectSearchMonthReportAMAwardsAction.action?userId=${sessionScope.UserInfo.userId}&type=3&classId=${clsMap.key }');" style="text-decoration: none; color: #026DB8;" onmouseover="this.style.color='red'" onmouseout="this.style.color='#026DB8'">月报表</a></li>																						
										</ul>
									</li>
                              </c:forEach>
                              </c:if>
								
								
								</ul>
							</div>																						
							</div>
							<!-- 个人德育报表结束 -->
							
						</td>
				</table>
			</div>
			
		</div>
		<div style="margin-left:192px;">
		<!-- 内容的iframe开始 -->
		<iframe id='baseSet' name='baseSet' src='<%=path%>/toMyDeskStudentscheduleLogAction.action'  frameborder='0' marginheight='0' marginwidth='0' style='margin:0px;' scrolling='auto' width='100%' height="100%"></iframe>
		<!-- 内容的iframe结束 -->
			
			
			
			
		</div>
		<div style="clear:both;"></div>
	</div>
	<div class="foot">

	</div>
</div>
<div id='oaCustomNavigation' style='width:250%;position: absolute;display: none;' onMouseOver="this.style.display=''" onMouseOut="this.style.display='none'"></div>
</body>

</html>
